package com.ch.config;

import com.ch.service.OrderService;
import org.checkerframework.checker.units.qual.C;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public class listen {
    @Autowired
    private OrderService orderService;
    @RabbitListener(queues = "${app.queuenamea}")
    public void listenSimpleQueueMessage(Map<String,Integer> msg) throws InterruptedException {
        orderService.updateUid(msg);
    }
    }
